<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ include file="include.inc.jsp"  %>
<html>
<head>
    <title></title>
    <link href="lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="lib/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" />
    
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="common/style.css" rel="stylesheet" type="text/css" />
    <script src="common/common.js" type="text/javascript"></script>
    
    <script src="lib/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
    <!-- <script src="lib/ligerUI/js/core/base.js" type="text/javascript"></script> 
    <script src="lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
    <script src="lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script> 
    <script src="lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script> -->
    <script type="text/javascript">
	    var manager=null;
	    var form=null;
        $(function () {
        	//生成表格
            manager=$("#maingrid").ligerGrid({
                columns: [
				{ display: '库存单号', name: 'r_id', align: 'center', width: 100, minWidth: 100 },
				{ display: '金属编号', name: 'g_id', align: 'center', width: 100, minWidth: 100 },
                { display: '金属名称', name: 'g_name', align: 'center', width: 100, minWidth: 150 },
                { display: '金属总量', name: 'r_amount', minWidth: 'auto',render: function (rowdata, rowindex, value){
                	return value+rowdata.g_unit;
                }
                },
                { display: '金属单价', name: 'g_price', minWidth: 'auto', render: function (rowdata, rowindex, value){
                	return value+"元\\"+rowdata.g_unit;
                }
                },
                { display: '金属总价', name:'price',width:'auto',render: function (rowdata, rowindex, value){
                	return value+"元";
                }
                }
                ], 
                sortName: 'r_id',
                checkbox:false,
                usePager:true,
                url:'${ctx}/repertory/repertoryGrid',
                onSuccess:function(data,grid){
                	data.Rows=data.rows;
                	data.Total=data.records;
                }
            });
            $("#pageloading").hide();
        });
    </script>
</head>
<body style="overflow-x:hidden">
<div class="l-loading" style="display:block" id="pageloading"></div>
<div class="container">
	<div style="padding:10px">

	</div>
	
	<div id="maingrid"></div>
	
</div>
<div style="display:none" id="target">
<div id="form"></div>
<div class="highlight">
<button onclick="$('.l-dialog-close').trigger('click')" style="float:right;margin-right:15px" type="button" class="btn btn-default">取消</button>
<button onclick='save()' style="float:right;margin-right:15px" type="button" class="btn btn-primary">保存</button>
</div>
	
</div>
</body>
</html>
